package v3;

import cn.hutool.json.JSONObject;
import org.freedesktop.dbus.DBusPath;
import org.freedesktop.dbus.ObjectPath;
import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.types.Variant;
import v3.inter.ObjectManagerInterface;

import java.util.Map;

import static v3.GATTApplication.*;

public class BluetoothGATTAppT {

    public static void main(String[] args) throws DBusException {
        // 初始化WiFi管理器
        WiFiManager wifiManager = new WiFiManager();
        GATTApplication gattApplication = new GATTApplication(null,wifiManager);
        JSONObject obj = new JSONObject();
        obj.put("IpType", "static");
        gattApplication.new CommandCharacteristic(new ObjectPath("com.cy.dbus","/com/cy/dbus/app/service0/command"),"-",new String[]{"write", "write-without-response"}).exec(obj);

    }
}
